import post from '@/common/http.js'

// 小程序 注册
export const register = (data) => {
	return post({
		url: "api/user/mobileregister"
	}, data)
}

// 小程序 登录
export const postCode = (data) => {
	return post({
		url: "api/wx/authorization"
	}, data)
}

// 同步用户信息
export const synchroUserinfo = () => {
	return post({
		url: "api/user/updUserInfo"
	})
}

// 登录页登录发送短信验证码
export const sendSms = (data) => {
	return post({
		url: "api/user_login/sendsms"
	}, data)
}

// 登录页登录
export const login = (data) => {
	return post({
		url: "api/user_login/mobileLogin"
	}, data)
}

//  注册发送短信验证码
export const sendSms_register = (data) => {
	return post({
		url: "api/user_login/registersendsms"
	}, data)
}

// 注册页注册
export const register_h5 = (data) => {
	return post({
		url: "api/user_login/mobileregister"
	}, data)
}

//  获取微信授权code
export const getcode_h5 = (data) => {
	return post({
		url: "api/wx/userinfo"
	}, data)
}
